<?php


namespace App\Http\Controllers\Api;


use App\Services\AdvVideoCallbackService;
use Illuminate\Http\Request;

class AdvVideoCallbackController extends Controller
{
    public function store(Request $request)
    {
        $memberId = auth('api')->user()->id;
        $advId = $request->input('adv_id');
        $type = $request->input('type');

        if (!$advId || !$type) {
            return $this->error('参数错误');
        }

        $ret = app(AdvVideoCallbackService::class)->handle($memberId, $advId, $type, $this->getMiniType());
        return $this->_success($ret);
    }
}
